class Goods:
    def __init__(self, name, price):
        self.name=name
        self.price=price




class Phone(Goods):
    def __init__(self, name, price, capacity, size):
        super().__init__(name,price)#子类调用父类的方法
        #扩展
        self.capacity=capacity
        self.size=size


phone1 = Phone('华为','5999','256G','5寸')
print(phone1.name)
print(phone1.price)
print(phone1.capacity)
print(phone1.size)
